<template>
  <div class="aside-container">
    <div class="user-icon">
      <xyAvatar :url="userHeader" :size="120"></xyAvatar>
      <div class="userName">{{ userName }}</div>
    </div>
    <div class="menu-container">
      <xyMenu :menu="menuData"></xyMenu>
    </div>
    <div class="contact-container">
      <xyContact :list="contactData"></xyContact>
    </div>
  </div>
</template>

<script>
import xyContact from '@/components/siteAside/xyContact.vue'
import xyMenu from '@/components/siteAside/xyMenu.vue'
import xyAvatar from '@/components/xyAvatar.vue'
import userHeader from '@/assets/userHeader.png'
import qcode from '@/assets/Qcode.png'

export default {
  components: { xyContact, xyMenu, xyAvatar },
  data() {
    return {
      userHeader: userHeader,
      userName: 'Hypnos_xy',
      menuData: [
        { icon: 'home', title: '首页', url: '/' },
        { icon: 'article', title: '文章', url: '/article' },
        { icon: 'about', title: '关于我', url: '/about' },
        { icon: 'project', title: '项目&效果', url: '/project' },
        { icon: 'message', title: '留言板', url: '/message' },
      ],
      contactData: [
        { icon: 'email', title: '1010870529@qq.com' },
        { icon: 'phone', title: '186****8888' },
        { icon: 'qq', title: '1010870529' },
        { icon: 'weixin', title: 'hypnos_xy', src: qcode },
      ],
    }
  },
}
</script>

<style scoped>
.aside-container {
  width: 250px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #222;
}
.user-icon {
  height: 200px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 100px;
  flex-direction: column;
}
.userName {
  color: #fff;
  font-size: 24px;
  margin-top: 5px;
}
.menu-container {
  margin: 10px 0 50px 0;
}
.contact-container {
  padding: 0 5px;
}
</style>
